{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2><a href="{$smarty.const.HOST_BACKEND}product/index">Trường học</a> &raquo; <a href="{$smarty.const.HOST_BACKEND}product/album">Album slideshow</a> &raquo; {if $intForm == 0}Thêm mới{elseif $intForm==1}Đăng hình{elseif $intForm == 2}Chỉnh sửa thông tin album{/if}</h2></div>
                    <div class="secData">
                    	<form name="frmUpload" id="frmUpload" method="post" enctype="multipart/form-data" action="{$smarty.const.HOST_BACKEND}product/doupload">  
                            <input type="hidden" name="pform" id="pform" value="{$intForm}" />
                            {if $intForm == 1}
                        		<input type="hidden" name="palbumid" id="palbumid" value="{$row.albumid}" />
                            {/if}
                        	{if isset($smarty.session.eduuerr)}
                            	<div class="userInput">
                                    <span class="errorMessage">{$smarty.session.eduuerr}</span>
                                </div>
                            {/if}
                            {if $arrAlbum}
                            	<div class="userInput">
                                    <label for="palbumid">Album sideshow:</label>
                                    <select id="palbumid" name="palbumid">
                                    	<option value="0">--Chọn--</option>
                                    	{foreach item=item from=$arrAlbum}
                                        	<option value="{$item.albumid}" {if $intAlbumId == $item.albumid}selected="selected"{/if}>{$item.name} ({$item.timage} hình)</option>
                                        {/foreach}
                                    </select>
                                </div>
                           	{else}
                            	<div class="userInput">
                                    <label for="pal_name">Tên album sideshow <span class="symbolRequired">*</span>:</label>
                                    <input type="text" value="{if isset($smarty.session.eduupost.pal_name)}{$smarty.session.eduupost.pal_name}{else}{$row.name}{/if}" name="pal_name" id="pal_name" class="text" maxlength="255" />
                                </div>
                            {/if}
                            {if $intForm < 2}
                                <div class="userInput">
                                    <label for="pimage">Hình trong album <span class="symbolRequired">*</span>:</label>
                                    <input type="file" class="text" name="pimage" id="pimage" value="" />
                                    
                                </div>
                                <div class="userInput">
                                    <label for="pname">Tên hình:</label>
                                    <input type="text" class="text" name="pname" id="pname" value="{if isset($smarty.session.eduupost.pname)}{$smarty.session.eduupost.pname}{/if}" maxlength="255" />
                                    {if $smarty.const.LANGUAGE_MULTI == 1}
                                    	<p class="note" style="clear:both;float:left;margin-left:210px;margin-top:5px;">Tiếng việt;tiếng anh</p>
                                    {/if}
                                </div>          
                            {/if}                                                                                                 
                            <div class="secAction">
                        		<input type="submit" value="Lưu dữ liệu"/>
                               	<input type="reset" value="Nhập lại"/>
                            </div>
                        </form>                                               
                   	</div>
                    {include file="product/box-img.tpl"}
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
